import request from '@/utils/request'
import { download } from '@/utils/request'

// 新增
export function addItem(data) {
  return request({
    url: '/businessCore/faQuestionTheme',
    method: 'post',
    data
  })
}

// 修改
export function updateItem(data) {
  return request({
    url: '/businessCore/faQuestionTheme',
    method: 'put',
    data
  })
}

// 删除
export function delItem(id) {
  return request({
    url: '/businessCore/faQuestionTheme/' + id,
    method: 'delete'
  })
}

// 导出
export function exportExcel(params, fileName) {
  const url = '/businessCore/faQuestionTheme/export'
  download(
    url,
    params,
    fileName + `_${new Date().getTime()}.xlsx`
  )
}